-- GENERATED SPELL FOR [Storm Tempered Keeper] --


function spell0_33722(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(63541,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33722', 2000, 1)
end

function spell1_33722(pUnit, Event) --@Separation Anxiety,Self--
pUnit:FullCastSpellOnTarget(63539,pUnit)
pUnit:RegisterEvent('Sorts_33722', 6272, 1)
end

function spell2_33722(pUnit, Event) --@Summon Charged Sphere,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(63527,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_33722', 1, 1)
end

function spell3_33722(pUnit, Event) --@Vengeful Surge,Self--
pUnit:FullCastSpellOnTarget(63630,pUnit)
pUnit:RegisterEvent('Sorts_33722', 626, 1)
end

function Sorts_33722(pUnit, Event)
local choix_sorts_33722 = math.random(0, 3)
if choix_sorts_33722 == 0 then
pUnit:RegisterEvent('spell0_33722', 1, 1)
end
if choix_sorts_33722 == 1 then
pUnit:RegisterEvent('spell1_33722', 1, 1)
end
if choix_sorts_33722 == 2 then
pUnit:RegisterEvent('spell2_33722', 1, 1)
end
if choix_sorts_33722 == 3 then
pUnit:RegisterEvent('spell3_33722', 1, 1)
end
end

function mob33722_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33722', math.random(1500, 3000), 1)
end

function mob33722_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33722_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33722_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33722, 1, 'mob33722_Action')
RegisterUnitEvent(33722, 2, 'mob33722_Leave')
RegisterUnitEvent(33722, 3, 'mob33722_Kill')
RegisterUnitEvent(33722, 4, 'mob33722_Die')
